/*
 * @ProjectName: 编程学习
 * @Copyright:   2019 HangZhou Yi Dev, Ltd. All Right Reserved.
 * @address:     https://yiyuery.github.io/
 * @date:        2019/5/20 20:57
 * @email:       xiazhaoyang@live.com
 * @description: 本内容仅限于编程技术学习使用，转发请注明出处.
 */
package com.example.component.gallery.service.bing.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Yi
 * @version v1.0.0
 * @date 2019-07-21 11:18
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人} 2019-07-21
 * @modify reason: {方法名}:{原因}
 * ...
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ImagesBean {
    /**
     * startdate : 20190720
     * fullstartdate : 201907201600
     * enddate : 20190721
     * url : /th?id=OHR.BuckinghamSummer_ZH-CN3519250117_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp
     * urlbase : /th?id=OHR.BuckinghamSummer_ZH-CN3519250117
     * copyright : 白金汉宫和维多利亚女王纪念碑，伦敦 (© CTC Creative/Offset)
     * copyrightlink : https://www.bing.com/search?q=%E7%99%BD%E9%87%91%E6%B1%89%E5%AE%AB%E5%92%8C%E7%BB%B4%E5%A4%9A%E5%88%A9%E4%BA%9A%E5%A5%B3%E7%8E%8B%E7%BA%AA%E5%BF%B5%E7%A2%91&form=hpcapt&mkt=zh-cn
     * title :
     * quiz : /search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20190720_BuckinghamSummer%22&FORM=HPQUIZ
     * wp : true
     * hsh : 24b2d7c847c835fdd4a6ccdf3d352dbd
     * drk : 1
     * top : 1
     * bot : 1
     * hs : []
     */
    @JsonProperty("startdate")
    private String startDate;
    @JsonProperty("fullstartdate")
    private String fullStartDate;
    @JsonProperty("enddate")
    private String endDate;
    private String url;
    @JsonProperty("urlbase")
    private String urlBase;
    private String copyright;
    @JsonProperty("copyrightlink")
    private String copyrightLink;
    private String title;
    private String quiz;
    private boolean wp;
    private String hsh;
    private int drk;
    private int top;
    private int bot;
    private List<?> hs;

    /**
     * 添加后缀
     * @return
     */
    public String getLocalName(String... strs) {
        StringBuilder sb = new StringBuilder(getStartDate());
        Arrays.asList(strs).forEach(sb::append);
        return sb.toString();
    }
}
